Navigation

  • index
  • next |
  • previous |
  • PyHowTo documentation »
  • Basic »
  • Datetime »

Table of Contents

Python v3.7 HowTos:

  • ----------------
  • Recursion
  • Backtracking
  • Dynamic Programming
  • Greedy
  • Sort
  • Binary Search
  • Depth First Search [DFS]
  • Breadth First Search [BFS]
  • Binary Search Tree [BST]
  • ----------------
  • Array
  • String
  • Heap
  • Stack
  • Queue
  • Tree
  • Linked List
  • Hash Table
  • Bit Manipulation
  • Two Pointers
  • Math
  • Decorator
  • ----------------
  • Basic
  • Intermediate
  • Advanced
  • Interview
  • ----------------
  • Spark
  • Tkinter
  • Turtle
  • Games
  • Web
  • ----------------
  • About
  • History

Previous topic

Count the number of Monday of the 1st day of the Month

Next topic

Calculate the date six months from the current date

Quick search

Print a string five times, delay three secondsΒΆ

time.sleep(3)

Print a string five times, delay three seconds.
import time

print("\nw3resource will print five times, \
       delay for three seconds.")

x = 0
while x < 5:
    print("w3resource")
    time.sleep(3)
    x += 1

Output:

w3resource will print five times, delay for three seconds.
w3resource
w3resource
w3resource
w3resource
w3resource

See also

https://www.w3resource.com/python-exercises/date-time-exercise/python-date-time-exercise-25.php

Navigation

  • index
  • next |
  • previous |
  • PyHowTo documentation »
  • Basic »
  • Datetime »
© Copyright 2020, Sergiy Zaytsev, szaytsev@hotmail.com. Created using Sphinx 2.3.0.